package ruler.services;

import ruler.main.WifiGPSRulerApplication;
import android.content.ComponentName;
import android.content.ServiceConnection;
import android.os.IBinder;

public class RulerServiceConnection implements ServiceConnection {

	private WifiGPSRulerApplication rulerActivity;

	public RulerServiceConnection(WifiGPSRulerApplication rulerActivity) {
		this.rulerActivity = rulerActivity;
	}

	public void onServiceConnected(ComponentName name, IBinder service) {
		this.rulerActivity.setServiceBinder((RulerServiceBinder) service);
	}

	public void onServiceDisconnected(ComponentName name) {
		this.rulerActivity.setServiceBinder(null);
	}
}
